﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Exercise17
{
    public partial class Form1 : Form
    {
        StrFun StrFun = new StrFun();
        User User;
        public Form1()
        {
            InitializeComponent();
        }

        private void BtnClearClick(object sender, EventArgs e)
        {
            TxtIn.Clear();
            TxtOut.Clear();
        }
        private void BtnGetClick(object sender, EventArgs e)
        {
            User = StrFun.GetResult(TxtIn.Text);
            if (User.bIsNull) { MessageBox.Show(User.StrMsg); }
            else              { TxtOut.Text = StrFun.Restring; }
        }
    }
}
